package thinking.proxy;

import org.junit.Test;

/**
 * 测试类
 */
public class JavaProxyTest {

    @Test
    public void testProxy () throws Throwable {
        Actor actor = new BaoQiang();
        DynamicProxy dynamicProxy = new DynamicProxy(actor);
        Actor actorProxy = dynamicProxy.getProxy();
        actorProxy.say("Jack");
    }



    @Test
    public void testGenerateProxyClass() {
        ProxyGeneratorUtils.writeProxyClassToHardDisk("D:/$Proxy11.class");
    }

}
